Add domain name check and UUID check to 'xm new' command.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 24 Jul 2007 17:05:04 +0000 (18:05 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 24 Jul 2007 17:05:04 +0000 (18:05 +0100)
commite313dc3ed8a13242ce9a9c5cb658d482c44a192e
treec60b0752812f502122f9499914e967053d426622
parent3e3989b612f269221d3bb510a619fd2baa0f68a6
Add domain name check and UUID check to 'xm new' command.

Add a domain name check and a UUID check to xm new command. The check
logic is as follows:

 - If the UUID is not specified
       - If a VM with same name exists
           => Update the config for that existing VM
       - Else no vm with same name exists
           => Define a brand new VM with auto-generated UUID
 - Else UUID is specified
       - If a VM with same UUID exists
             - If name is different
                   => Error
             - Else if name is same
                   => Update the config for that existing VM
       - Else no VM with same UUID exists
             - If name is different
                   => Define a branch new VM with that name
             - Else if name is same
                   => Error

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendDomain.py